package com.newhope.eshop.config;

import com.alibaba.dubbo.config.ProtocolConfig;
import com.newhope.eshop.service.api.model.User;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.SocketUtils;

@Configuration
public class DubboConfiguration {

    @Bean
    public User getUser() {
        return new User();
    }

/*    @Bean
    @ConditionalOnMissingBean(ProtocolConfig.class)
    public ProtocolConfig protocolConfig() {
        ProtocolConfig config = new ProtocolConfig();
        config.setName("dubbo");


        config.setPort(20812);


        return config;
    }*/
}
